//
//  DownloadData.h
//  iStock Global
//
//  Created by Andy on 2010/10/13.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol DownloadDataDelgete

-(void)Download_Finish:(NSString *)datas Oidentifier:(NSString*)OutIdentifier;
-(void)Download_didFailWithError:(NSError *)error Oidentifier:(NSString*)OutIdentifier; //網路下載資料失敗

@end


@interface DownloadData : NSObject {
	//***{ 網路下載資料範本
	
	NSMutableData *receivedData;
	NSURLConnection *connection;
	NSString *DownloadData;
	NSString *identifier;
	BOOL loadingData;
    
	id <DownloadDataDelgete> delgete;	
    //***}	
}
//***{ 網路下載資料範本
@property (nonatomic, readwrite, assign) BOOL loadingData;
@property (nonatomic, retain) NSMutableData *receivedData;
@property (nonatomic, retain) NSURLConnection *connection;
@property (nonatomic, retain) NSString *DownloadData;
@property(retain) id <DownloadDataDelgete> delgete;


-(void)StartDownload:(NSString *)urls identifier:(NSString *)Aidentifier;
-(void)StopDownload;



@end
